#include <bits/stdc++.h>
using namespace std;
using uint=unsigned int;
using ll=long long;
using ull=unsigned long long;
using i128=__int128;
const int N=1e6+5;

void solve(){
    
    return;
}

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr); std::cout.tie(nullptr);
    int n,k;
    cin>>n>>k;
    string s;
    vector<int> ol(n);
    cin>>s;
    for(int i=0;i<n;i++){
        ol[i]=s[i]-'0';
    }
    //记录每个1子串的起始下标和终止下标
    vector<int> me;
    if(ol[0]==1)me.push_back(0);
    for(int i=1;i<n;i++){
        if(ol[i]==1&&ol[i-1]==0)me.push_back(i);
        if(ol[i]==0&&ol[i-1]==1)me.push_back(i-1);
    }
    if(ol[n-1]==1)me.push_back(n-1);
    vector<int> ans(n);
    for(int i=0;i<=me[2*k-1-2];i++)ans[i]=ol[i];
    for(int i=me[2*k-1-2]+1;i<me[2*k-1-2]+1+me[2*k-1]-me[2*k-1-1]+1;i++)ans[i]=1;
    for(int i=me[2*k-1-1];i<=me[2*k-1];i++)ol[i]=-1;
    int j=me[2*k-1-2]+1+me[2*k-1]-me[2*k-1-1]+1;
    for(int i=me[2*k-1-2]+1;i<n;i++){
        if(ol[i]!=-1)ans[j++]=ol[i];
    }
    for(int i=0;i<n;i++)cout<<ans[i];
    cout<<endl;

    return 0;
}